#include "dspSimulator/instruction/SPKERNELR.h"

namespace dspsimulator {
    std::shared_ptr<DspInstruction>
    SPKERNELR::decode_standard_instruction(const std::shared_ptr<DspInstructionInfo> &dsp_instruction_info) {
        std::shared_ptr<SPKERNELR> spkernelr;
        std::bitset<32> &data = dsp_instruction_info->m_standard_bits;
        if (common::check_bits<30>(data, 0b000000000000001101100000000000, 2)) {
            spkernelr = std::make_shared<SPKERNELR>(dsp_instruction_info->address(), 4);
            spkernelr->m_p = data[0];
        }
        return spkernelr;
    }
}